//
//  DCAvchatNIMManager.h
//  DCAvchatKit
//
//  Created by zhangtao on 2020/9/18.
//  Copyright © 2020 zhangtao. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <NIMAVChat/NIMAVChat.h>
#import "DCAvchatCallInvitationDelegate.h"
#import "DCAvchatCalleeStateDelegate.h"
#import "DCAvchatCallStateDelegate.h"
#import "DCAvchatCallControlDelegate.h"
#import "DCAvchatSendScreenDelegate.h"
#import "DCAvchatKitMacro.h"
#import <DCUtilKit/DCUtilKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface DCAvchatAdapter : NSObject<NIMNetCallManagerDelegate>

//通话信息委托
@property(nonatomic,weak) id<DCAvchatCallStateDelegate> avchatCallStateDelegate;
//通话控制信息委托
@property(nonatomic,weak) id<DCAvchatCallControlDelegate> avchatCallControlDelegate;

//初始化网易云信
- (void) initAvchat:(NSString*)appKey;
//同意视频通话
- (void) agreeToVideo:(UInt64)user;
//登录
- (void) login:(NSDictionary*)loginInfo callback:(nullable void (^)(DCError *error,NSDictionary *data))callback;
//登出
- (void) logout;
//加入房间
- (void) joinRoom:(NSString*)roomId options:(NSDictionary*)options callback:(nullable void (^)(DCError *error,NSDictionary *data))callback;
//退出房间
- (void) leaveRoom:(NSString*)roomId;
//推出群聊
- (void) quitTeam:(NSString*)teamId;
//切换音视频
- (void) switchAVControl:(UInt64)user type:(DCAvchatNetCallMediaType)type;
//停止视频采集
- (void) stopVideoCapture;
//开启自定义视频采集
- (void) startCustomVideo;
//开启视频采集
- (void) startVideoCapture;
//切换摄像头
- (void) switchCamera:(DCAvchatNetCallCamera)camera;
//设置摄像头关闭
- (void) setCameraDisable:(BOOL)disable;
//打开关闭视频
- (void) switchVideoStatus:(BOOL)open callId:(UInt64)callId;
//设置静音
- (void) setMute:(BOOL)isMute;
//设置麦克风
- (void) setSpeaker:(BOOL)useSpeaker;
//设置禁止发送视频
- (void) setVideoSendMute:(BOOL)mute;
//设置禁止发送音频
- (void) setAudioSendMute:(BOOL)mute;
//开始网络探测任务
- (void) startDetectTaskForDetectType:(int)type callback:(nullable void (^)(DCError *error,NSDictionary *data))callback;
//停止网络探测任务
- (void) stopDetectTask:(int)taskId;
//本地截图. 截取自己下一帧待发送的画面
- (void) takeSnapshot:(void(^)(UIImage * __nullable image))callback;
//离开多人会议
- (void) leaveMeeting:(NSDictionary*)meetingInfo;
//发送视频 SampleBuffer
- (void) sendVideoSampleBuffer:(CMSampleBufferRef)buffer;

@end

NS_ASSUME_NONNULL_END
